package com.zhi.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;
import com.zhi.dao.UserRepository;
import com.zhi.entity.User;
import com.zhi.service.LoginService;

@Service
public class LoginServiceImpl implements LoginService{
	
	@Autowired
	private UserRepository userRepository;

	@Override
	public boolean existUser(User user) {
		Example<User> userExample = Example.of(user);
		return userRepository.exists(userExample);
	}

}
